<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.lmpop.updateHtml.updateHtml.UpdateJsp" %>
<%@page import="com.lmpop.trade.tb_commpara.Tb_commparaInfo" %>

<%
	request.setCharacterEncoding("UTF-8");
	Tb_commparaInfo compara = new Tb_commparaInfo();
	UpdateJsp updateJsp = new UpdateJsp();
	Hashtable comMap = new Hashtable();
	String list_model = "";
	int result_code = 0;
	if(request.getParameter("list_model")!=null)
	{
		list_model  = request.getParameter("list_model");
		comMap = compara.getOneCompara("26",list_model);
	}

	String index_temp="",save_dir="",default_page="",param_file_path="";
	if(comMap.get("para_code3")!=null) index_temp = comMap.get("para_code3").toString();
	if(comMap.get("para_code4")!=null) save_dir = comMap.get("para_code4").toString();
	if(comMap.get("para_code5")!=null) default_page = comMap.get("para_code5").toString();
	if(comMap.get("para_code6")!=null) param_file_path = comMap.get("para_code6").toString();

	try{
		updateJsp.updateWeb(index_temp,save_dir,default_page,param_file_path,new Hashtable());
	}catch(Exception e){
		result_code = -1;
	}
	

	if(result_code==0){
		out.println("更新成功。");
	}else{
		out.println("更新失败。");
	}
%>
